# Contributor: Rasmus Thomsen <oss@cogitri.dev>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=gnome-shortwave
pkgver=4.0.1
pkgrel=0
pkgdesc="Listen to internet radio"
url="https://gitlab.gnome.org/World/Shortwave"
# loongarch64: blocked by libc crate
arch="all !loongarch64"
license="GPL-3.0-only"
depends="
	gst-libav
	gst-plugins-bad
	gst-plugins-good
	"
makedepends="
	cargo
	curl-dev
	desktop-file-utils
	glib-dev
	gst-plugins-bad-dev
	gst-plugins-base-dev
	gstreamer-dev
	gtk4.0-dev
	lcms2-dev
	libadwaita-dev
	libseccomp-dev
	libshumate-dev
	meson
	openssl-dev>3
	sqlite-dev
	"
checkdepends="
	appstream-glib
	xvfb-run
	"
source="https://gitlab.gnome.org/World/Shortwave/-/archive/$pkgver/Shortwave-$pkgver.tar.gz"
subpackages="$pkgname-lang"
builddir="$srcdir/Shortwave-$pkgver"
options="net"

build() {
	abuild-meson . output
	meson compile -C output
}

check() {
	xvfb-run -a meson test --no-rebuild --print-errorlogs -C output
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C output
}

sha512sums="
3ce63cbe7ba02cfb6474b78514ceeeac2699e87b06559c720be9af89126a1ac4faf9eba424edb4a1b9122061098db8b929c3a709b95407e1b796483071409cfa  Shortwave-4.0.1.tar.gz
"
